
//扫描所有controller 写死了后面优化
let useController=(app)=>{
  let path=require('path').join(__dirname,'../../');

  const sysControllers = require('require-all')({
    dirname: path+ 'controller/sys',
  })
  const bizControllers = require('require-all')({
    dirname: path + 'controller/biz',
  })
//文档上不对 后面再改
  for( let key in sysControllers){
    app.use(sysControllers[key])
  }
  for( let key in bizControllers){
    app.use(bizControllers[key])
  }
}

export {
  useController
}
